<?php

if (!defined('IN_AJAX')) die(basename(__FILE__));

global $comment;

$mode 		= (string) $this->request['mode'];
$comment_id = (int) $this->request['comment_id']; 
$blog_id 	= (int) $this->request['blog_id']; 

$comment_blog = DB()->fetch_row("
					SELECT *
					FROM 
						". TS_BLOG_COMMENTS ."
					WHERE 
						blog_id = $blog_id
					AND comment_id = $comment_id
					LIMIT 1
					");

$html = '';

switch ($mode)
{
	case 'delete_comment':
		$comment->delete_comment($comment_id, $comment_blog['comment_user_id']);
		$html = $this->ajax_die('Коментарий удален');
		break;
}

$this->response['html']	= $html;
$this->response['mode']	= $mode;